 //
//  ReadChoicTableViewCell.m
//  项目
//
//  Created by 关雷 on 14-12-30.
//  Copyright (c) 2014年 张诗雨. All rights reserved.
//

#import "ReadChoicTableViewCell.h"

@implementation ReadChoicTableViewCell
- (void)dealloc
{
    [_titleLable release];
    [_nameLable release];
    [_contentLable release];
    [_imgBackV release];
    [_imgV release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgBackV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"read.png"]];
        
        [self.contentView addSubview:_imgBackV];
        [_imgBackV release];
        
        self.titleLable = [[UILabel alloc] init];
        [self.imgBackV addSubview:_titleLable];
        [_titleLable release];
        self.nameLable = [[UILabel alloc] init];
        [self.nameLable setTextAlignment:NSTextAlignmentRight];
        [_nameLable setFont:[UIFont systemFontOfSize:12.0f]];
        [self.imgBackV addSubview:_nameLable];
        [_nameLable release];
        self.contentLable = [[UILabel alloc] init];
        [_contentLable setFont:[UIFont systemFontOfSize:12.0f]];
        _contentLable.numberOfLines = NO;
        [self.imgBackV addSubview:_contentLable];
        [_contentLable release];
        self.imgV = [[UIImageView alloc] init];
        [self.imgBackV addSubview:_imgV];
        [_imgV release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imgBackV.frame = CGRectMake(10, 15, self.frame.size.width - 20, self.frame.size.height - 20);
    self.titleLable.frame = CGRectMake(5, self.frame.size.height / 3 * 2 - 20, self.frame.size.width / 2 + 40, 30);
    self.nameLable.frame = CGRectMake(self.frame.size.width - 110, self.frame.size.height / 3 * 2 - 20, 75, 30);
    self.contentLable.frame = CGRectMake(5, self.frame.size.height - 70, self.frame.size.width - 30, 40);
    self.imgV.frame = CGRectMake(0, 0, self.imgBackV.frame.size.width, self.imgBackV.frame.size.height / 3 * 2 - 10);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
